import {getAsyncComponent} from "@/utils";
import {Plugin} from "vue";
// 要异步导入的全局组件
const asyncComponentPathArr: any = [
    // {
    //     name: "PersonalCenter",
    //     path: '../components/PersonalCenter/PersonalCenter.vue'
    // }
]
// app.use一次性注册多个全局组件
const asyncComponentsPlugin: Plugin = {
    install(app) {
        for (let item of asyncComponentPathArr) {
            app.component(item.name, getAsyncComponent(item.path))
        }
    }
}
export default asyncComponentsPlugin